package cn.wolfcode.memeber.member.service.impl;

import cn.wolfcode.luowowo.member.domain.UserFan;
import cn.wolfcode.luowowo.member.service.IUserFanService;
import cn.wolfcode.memeber.member.service.mapper.UserFanMapper;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class UserFanServiceImpl implements IUserFanService {

    @Autowired
    private UserFanMapper userFanMapper;

    @Override
    public void insert(UserFan userFan) {
        userFanMapper.insert(userFan);
    }

    @Override
    public void update(UserFan userFan) {

    }

    @Override
    public void delete(Long id) {

    }

    @Override
    public UserFan get(Long id) {
        return null;
    }

    @Override
    public List<UserFan> list() {
        return userFanMapper.selectAll();
    }

    @Override
    public List<UserFan> queryByAuthorId(Long uid) {
        return userFanMapper.queryByAuthorId(uid);
    }

    @Override
    public int getTotalFansById(Long uid) {
        return userFanMapper.selectTotalFansById(uid);
    }

    @Override
    public int getTotalFocusById(Long uid) {
        return userFanMapper.selectTotalFocusById(uid);
    }
}
